Optimal. Leaf size=139 \[ -\frac {a+b \log \left (c (d+e x)^n\right )}{2 g \left (f+g x^2\right )}-\frac {b e^2 n \log \left (f+g x^2\right )}{4 g \left (d^2 g+e^2 f\right )}+\frac {b e^2 n \log (d+e x)}{2 g \left (d^2 g+e^2 f\right )}+\frac {b d e n \tan ^{-1}\left (\frac {\sqrt {g} x}{\sqrt {f}}\right )}{2 \sqrt {f} \sqrt {g} \left (d^2 g+e^2 f\right )} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.08, antiderivative size = 139, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 6, integrand size = 25, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.240, Rules used = {2413, 706, 31, 635, 205, 260} \[ -\frac {a+b \log \left (c (d+e x)^n\right )}{2 g \left (f+g x^2\right )}-\frac {b e^2 n \log \left (f+g x^2\right )}{4 g \left (d^2 g+e^2 f\right )}+\frac {b e^2 n \log (d+e x)}{2 g \left (d^2 g+e^2 f\right )}+\frac {b d e n \tan ^{-1}\left (\frac {\sqrt {g} x}{\sqrt {f}}\right )}{2 \sqrt {f} \sqrt {g} \left (d^2 g+e^2 f\right )} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 31
Rule 205
Rule 260
Rule 635
Rule 706
Rule 2413
Rubi steps
\begin {align*} \int \frac {x \left (a+b \log \left (c (d+e x)^n\right )\right )}{\left (f+g x^2\right )^2} \, dx &=-\frac {a+b \log \left (c (d+e x)^n\right )}{2 g \left (f+g x^2\right )}+\frac {(b e n) \int \frac {1}{(d+e x) \left (f+g x^2\right )} \, dx}{2 g}\\ &=-\frac {a+b \log \left (c (d+e x)^n\right )}{2 g \left (f+g x^2\right )}+\frac {(b e n) \int \frac {d g-e g x}{f+g x^2} \, dx}{2 g \left (e^2 f+d^2 g\right )}+\frac {\left (b e^3 n\right ) \int \frac {1}{d+e x} \, dx}{2 g \left (e^2 f+d^2 g\right )}\\ &=\frac {b e^2 n \log (d+e x)}{2 g \left (e^2 f+d^2 g\right )}-\frac {a+b \log \left (c (d+e x)^n\right )}{2 g \left (f+g x^2\right )}+\frac {(b d e n) \int \frac {1}{f+g x^2} \, dx}{2 \left (e^2 f+d^2 g\right )}-\frac {\left (b e^2 n\right ) \int \frac {x}{f+g x^2} \, dx}{2 \left (e^2 f+d^2 g\right )}\\ &=\frac {b d e n \tan ^{-1}\left (\frac {\sqrt {g} x}{\sqrt {f}}\right )}{2 \sqrt {f} \sqrt {g} \left (e^2 f+d^2 g\right )}+\frac {b e^2 n \log (d+e x)}{2 g \left (e^2 f+d^2 g\right )}-\frac {a+b \log \left (c (d+e x)^n\right )}{2 g \left (f+g x^2\right )}-\frac {b e^2 n \log \left (f+g x^2\right )}{4 g \left (e^2 f+d^2 g\right )}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.20, size = 165, normalized size = 1.19 \[ \frac {2 b d e \sqrt {g} n \left (f+g x^2\right ) \tan ^{-1}\left (\frac {\sqrt {g} x}{\sqrt {f}}\right )-\sqrt {f} \left (2 a d^2 g+2 a e^2 f+2 b \left (d^2 g+e^2 f\right ) \log \left (c (d+e x)^n\right )-2 b e^2 n \left (f+g x^2\right ) \log (d+e x)+b e^2 g n x^2 \log \left (f+g x^2\right )+b e^2 f n \log \left (f+g x^2\right )\right )}{4 \sqrt {f} g \left (f+g x^2\right ) \left (d^2 g+e^2 f\right )} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.49, size = 373, normalized size = 2.68 \[ \left [-\frac {2 \, a e^{2} f^{2} + 2 \, a d^{2} f g + {\left (b d e g n x^{2} + b d e f n\right )} \sqrt {-f g} \log \left (\frac {g x^{2} - 2 \, \sqrt {-f g} x - f}{g x^{2} + f}\right ) + {\left (b e^{2} f g n x^{2} + b e^{2} f^{2} n\right )} \log \left (g x^{2} + f\right ) - 2 \, {\left (b e^{2} f g n x^{2} - b d^{2} f g n\right )} \log \left (e x + d\right ) + 2 \, {\left (b e^{2} f^{2} + b d^{2} f g\right )} \log \relax (c)}{4 \, {\left (e^{2} f^{3} g + d^{2} f^{2} g^{2} + {\left (e^{2} f^{2} g^{2} + d^{2} f g^{3}\right )} x^{2}\right )}}, -\frac {2 \, a e^{2} f^{2} + 2 \, a d^{2} f g - 2 \, {\left (b d e g n x^{2} + b d e f n\right )} \sqrt {f g} \arctan \left (\frac {\sqrt {f g} x}{f}\right ) + {\left (b e^{2} f g n x^{2} + b e^{2} f^{2} n\right )} \log \left (g x^{2} + f\right ) - 2 \, {\left (b e^{2} f g n x^{2} - b d^{2} f g n\right )} \log \left (e x + d\right ) + 2 \, {\left (b e^{2} f^{2} + b d^{2} f g\right )} \log \relax (c)}{4 \, {\left (e^{2} f^{3} g + d^{2} f^{2} g^{2} + {\left (e^{2} f^{2} g^{2} + d^{2} f g^{3}\right )} x^{2}\right )}}\right ] \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.23, size = 218, normalized size = 1.57 \[ \frac {b d n \arctan \left (\frac {g x}{\sqrt {f g}}\right ) e}{2 \, {\left (d^{2} g + f e^{2}\right )} \sqrt {f g}} - \frac {b n e^{2} \log \left (g x^{2} + f\right )}{4 \, {\left (d^{2} g^{2} + f g e^{2}\right )}} + \frac {b g n x^{2} e^{2} \log \left (x e + d\right ) - b d^{2} g n \log \left (x e + d\right ) - 2 \, b d^{2} g \log \relax (c) - 2 \, a d^{2} g - 2 \, b f e^{2} \log \relax (c) - 2 \, a f e^{2}}{2 \, {\left (d^{2} g^{3} x^{2} + f g^{2} x^{2} e^{2} + d^{2} f g^{2} + f^{2} g e^{2}\right )}} - \frac {b d^{2} g \log \relax (c) + a d^{2} g + b f e^{2} \log \relax (c) + a f e^{2}}{2 \, {\left (d^{2} g + f e^{2}\right )} {\left (g x^{2} + f\right )} g} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [C] time = 0.56, size = 765, normalized size = 5.50 \[ \text {result too large to display} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 1.05, size = 130, normalized size = 0.94 \[ -\frac {1}{4} \, b e n {\left (\frac {e \log \left (g x^{2} + f\right )}{e^{2} f g + d^{2} g^{2}} - \frac {2 \, e \log \left (e x + d\right )}{e^{2} f g + d^{2} g^{2}} - \frac {2 \, d \arctan \left (\frac {g x}{\sqrt {f g}}\right )}{{\left (e^{2} f + d^{2} g\right )} \sqrt {f g}}\right )} - \frac {b \log \left ({\left (e x + d\right )}^{n} c\right )}{2 \, {\left (g^{2} x^{2} + f g\right )}} - \frac {a}{2 \, {\left (g^{2} x^{2} + f g\right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.79, size = 366, normalized size = 2.63 \[ \frac {b\,e^2\,n\,\ln \left (d+e\,x\right )}{2\,d^2\,g^2+2\,f\,e^2\,g}-\frac {\ln \left (\frac {\left (b\,e^2\,f\,g\,n+b\,d\,e\,n\,\sqrt {-f\,g^3}\right )\,\left (x\,\left (2\,d^2\,e\,g^3-6\,e^3\,f\,g^2\right )-8\,d\,e^2\,f\,g^2\right )}{4\,\left (d^2\,f\,g^3+e^2\,f^2\,g^2\right )}+\frac {b\,d\,e^2\,g\,n}{2}+\frac {3\,b\,e^3\,g\,n\,x}{2}\right )\,\left (b\,e^2\,f\,g\,n+b\,d\,e\,n\,\sqrt {-f\,g^3}\right )}{4\,\left (d^2\,f\,g^3+e^2\,f^2\,g^2\right )}-\frac {\ln \left (\frac {\left (b\,e^2\,f\,g\,n-b\,d\,e\,n\,\sqrt {-f\,g^3}\right )\,\left (x\,\left (2\,d^2\,e\,g^3-6\,e^3\,f\,g^2\right )-8\,d\,e^2\,f\,g^2\right )}{4\,\left (d^2\,f\,g^3+e^2\,f^2\,g^2\right )}+\frac {b\,d\,e^2\,g\,n}{2}+\frac {3\,b\,e^3\,g\,n\,x}{2}\right )\,\left (b\,e^2\,f\,g\,n-b\,d\,e\,n\,\sqrt {-f\,g^3}\right )}{4\,\left (d^2\,f\,g^3+e^2\,f^2\,g^2\right )}-\frac {b\,\ln \left (c\,{\left (d+e\,x\right )}^n\right )}{2\,g\,\left (g\,x^2+f\right )}-\frac {a}{2\,g^2\,x^2+2\,f\,g} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F(-1)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________